package com.boot.service;


import com.boot.entity.*;

import java.util.List;
import java.util.Map;

public interface ISupplierManagementService {
    /**
     * 查询所有合作供应商
     * @param companyId
     * @return
     */
    public List<Map<String,Object>> queryAllSupplier(int companyId,String supplierName);

    /**
     * 获取查询所有合作供应商的条数
     * @return
     */
    public int countSupplierList(int companyId,String supplierName);

    /**
     * 通过供应商id查询供应商详细信息
     * @param supplierId
     * @return
     */
    public Map<String,Object> querySupplierDetails(int supplierId);

    /**
     * 查询所有成为供应商审核记录
     * @param supplierId
     * @param companyId
     * @return
     */
    public List<Map<String,Object>> queryCheck(int supplierId,int companyId);

    /**
     * 查询所有供应商成为公司供应商申请
     * @param companyId
     * @return
     */
    public List<Map<String,Object>> queryCompanyApply(int companyId,String auditStatus,String supplierName);

    public int countCompanyApply(int companyId,String auditStatus,String supplierName);
    /**
     * 通过id查询供应商成为公司供应商申请
     * @param csId
     * @return
     */
    public Map<String,Object> queryCompanyApplyById(int csId);
    /**
     * 查询所有电厂推荐供应商申请
     * @param companyId
     * @return
     */
    public List<Map<String,Object>> queryPowerApply(int companyId,String auditStatus,String supplierName);

    /**
     * 通过id查询电厂推荐供应商申请
     * @param bePSupplierId
     * @return
     */
    public Map<String,Object> queryPowerApplyById(int bePSupplierId);

    /**
     * 查询所有电厂推荐申请条数
     * @param companyId
     * @return
     */
    public int countPowerApply(int companyId,String auditStatus,String supplierName);

    /**
     * 查询所有电厂拉黑申请
     * @param companyId
     * @return
     */
    public List<Map<String,Object>> queryBlackApply(int companyId,String auditStatus,String supplierName);

    /**
     * 查询所有电厂拉黑申请条数
     * @param companyId
     * @return
     */
    public int countBlackApply(int companyId,String auditStatus,String supplierName);

    /**
     * 通过拉黑申请id查询申请
     * @param blacklistId
     * @return
     */
    public Map<String,Object> queryBlackApplyById(int blacklistId);

    /**
     * 通过申请id查询审核记录
     * @param blacklistId
     * @return
     */
    public Map<String,Object> queryBlackApplyCheck(int blacklistId);
    /**
     * 查询年度评价
     * @param years
     * @param companyId
     * @return
     */
    public  List<Map<String,Object>> queryYearScore(int years,int companyId,String supplierName);

    /**
     * 查询年度评价条数
     * @param years
     * @param companyId
     * @return
     */
    public int countYearScore(int years,int companyId,String supplierName);

    /**
     * 查询每月评价
     * @param supplierId
     * @param years
     * @return
     */
    public List<Map<String,Object>> queryMonthScore(int supplierId,int years);

    /**
     * 更新成为公司供应商申请
     * @param beCSupplier
     * @return
     */
    public boolean updataBeCSupplier(BeCSupplier beCSupplier);

    /**
     * 添加成为公司供应商审核记录
     * @param csCheck
     * @return
     */
    public boolean saveCompanyApplyCheck(CSCheck csCheck);

    /**
     * 添加公司合作供应商
     * @param companySupplier
     * @return
     */
    public boolean saveCompanySupplier(CompanySupplier companySupplier);

    /**
     * 查询公司下所有电厂的id
     * @param companyId
     * @return
     */
    public  List<Integer> queryAllPowerId(int companyId);

    /**
     * 添加电厂供应商
     * @param pSupplier
     * @return
     */
    public  boolean savePowerSupplier(PowerPlantSupplier pSupplier);

    /**
     * 更新电厂推荐供应商申请
     * @param bePSupplier
     * @return
     */
    public boolean updataBePSupplier(BePSupplier bePSupplier);

    /**
     * 添加推荐供应商审核记录
     * @param psCheck
     * @return
     */
    public Boolean savePSCheck(PSCheck psCheck);

    /**
     * 根据公司ID和供应商ID查询公司和供应商合作记录
     * @param companyId
     * @param supplierId
     * @return
     */
    public CompanySupplier queryCompanySupplier(int companyId,int supplierId);

    /**
     * 更新合作供应商记录
     * @param companySupplier
     * @return
     */
    public Boolean updataCompanySupplier(CompanySupplier companySupplier);

    /**
     * 查询已合作电厂ID
     * @param companyId
     * @param supplierId
     * @return
     */
    public List<Integer> queryPowerSupplierId(int companyId,int supplierId);

    /**
     * 更新拉黑申请
     * @param blackList
     * @return
     */
    public Boolean updataBlackList(BlackList blackList);

    /**
     * 添加拉黑审核记录
     * @param blackListCheck
     * @return
     */
    public Boolean saveBlackListCheck(BlackListCheck blackListCheck);

    /**
     * 拉黑电厂合作供应商
     * @param companyId
     * @param supplierId
     * @return
     */
    public Boolean updataPowerSupplierBlack(int companyId,int supplierId);

    /**
     * 修改电厂合作供应商类型
     * @param companyId
     * @param supplierId
     * @param supplierType
     * @return
     */
    public Boolean updataPowerSupplierType(int companyId,int supplierId,String supplierType);
}
